package dao;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Teacher entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "teacher", catalog = "assistedlearning")
public class Teacher implements java.io.Serializable {

    // Fields

    private String teacherid;
    private String name;
    private String sex;
    private Date birthdate;
    private String description;
    private String courseid;
    private String rank;

    // Constructors

    /** default constructor */
    public Teacher() {
    }

    /** minimal constructor */
    public Teacher(String teacherid, String name, String sex, Date birthdate) {
	this.teacherid = teacherid;
	this.name = name;
	this.sex = sex;
	this.birthdate = birthdate;
    }

    /** full constructor */
    public Teacher(String teacherid, String name, String sex, Date birthdate,
	    String description) {
	this.teacherid = teacherid;
	this.name = name;
	this.sex = sex;
	this.birthdate = birthdate;
	this.description = description;
    }

    // Property accessors
    @Id
    @Column(name = "teacherid", unique = true, nullable = false, length = 10)
    public String getTeacherid() {
	return this.teacherid;
    }

    public void setTeacherid(String teacherid) {
	this.teacherid = teacherid;
    }

    @Column(name = "name", nullable = false, length = 10)
    public String getName() {
	return this.name;
    }

    public void setName(String name) {
	this.name = name;
    }

    @Column(name = "sex", nullable = false, length = 2)
    public String getSex() {
	return this.sex;
    }

    public void setSex(String sex) {
	this.sex = sex;
    }

    @Temporal(TemporalType.DATE)
    @Column(name = "birthdate", nullable = false, length = 10)
    public Date getBirthdate() {
	return this.birthdate;
    }

    public void setBirthdate(Date birthdate) {
	this.birthdate = birthdate;
    }

    @Column(name = "description", length = 512)
    public String getDescription() {
	return this.description;
    }

    public void setDescription(String description) {
	this.description = description;
    } 
    
    @Column(name = "courseid", length=4)
    public String getCourseid() {
        return courseid;
    }

    public void setCourseid(String courseid) {
        this.courseid = courseid;
    }

    @Column(name = "rank", length = 2)
    public String getRank() {
        return rank;
    }

    public void setRank(String rank) {
        this.rank = rank;
    }

    
}